# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-overpy
_pkgorig=overpy
pkgver=0.7
pkgrel=1
pkgdesc="Python Wrapper to access the Overpass API "
url="https://github.com/DinoTools/python-overpy"
arch="noarch"
license="MIT"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/o/overpy/overpy-$pkgver.tar.gz"
builddir="$srcdir/$_pkgorig-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
3bb37bf6e2b5a94c0ff8e677c1b4c65207ddc1b8cdce53b541bcf1a4eceb34e0d5ed7a1b8d6ee7164adb932afbc35bbe25be6d960fd7cd7ea261fdb7d3ddcb2a  py3-overpy-0.7.tar.gz
"
